<?php
/**
 * Created by PhpStorm.
 * User: acker
 * Date: 21-06-08
 * Time: 下午6:25
 */

namespace App\Models\yb;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Model;
use Encore\Admin\Traits\DefaultDatetimeFormat;


class SmsModel extends Model
{
    use DefaultDatetimeFormat;

    use SoftDeletes;

    /**
     *
     *计量单位
     * @var string
     */
    protected $table = 'yb_sms';

    /**
     * 主键
     *
     * @var string
     */
    protected $primaryKey = 'id';


    /**
     * 该模型是否被自动维护时间戳
     *
     * @var bool
     */
    public $timestamps = true;

    /**
     * @return array
     */
    protected function selectOptions(){
        $data_array =array();
        $data = self::get();
        foreach($data as $k=>$v){
            $data_array[$v['sms_code']] = $v['sms_title'];
        }
        return $data_array;
    }


}
